package com.wyp.demo.video;

import android.app.ProgressDialog;
import android.content.Context;
import android.net.Uri;
import android.os.Handler;
import android.os.Message;

public class MyProgressDialog extends ProgressDialog {
	public Handler handler = new Handler(){
		@Override
		public void handleMessage(Message msg) {
			super.handleMessage(msg);
			
			final MyMediaPlayMask context = (MyMediaPlayMask)msg.obj;
			Thread th = new Thread(){
				@Override
				public void run() {
					try {
						sleep(500);
						context.m1.reset();
						context.m1.setDataSource(context,
								Uri.parse("http://f.youku.com/player/getFlvPath/sid/133016502714055_02/st/mp4/fileid/03000808014F29A4291D95055DF531E802B34D-6C1B-2D23-71FC-727FC2DCC1AF?K=581e45df1f72101d261c309b&hd=1"));
						context.m1.prepare();
					} catch (Exception e) {
						e.printStackTrace();
					}
				}
			};
				
			th.start();
		}
		
	};
	public MyProgressDialog(Context context) {
		super(context);
		
	}

}
